<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>监听手机返回键3</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style>
            @media only screen and (min-width:720px){*{max-width: 720px;margin: 0 auto;}html{font-size: 100px !important;}}
            html{font-size:calc(100/720*100vw)}
            div{font-size: 0.3rem;text-align: center;line-height: 2rem;}
            a{display: block;text-align: center;font-size: 0.25rem;}
        </style>
        <script src="jquery-2.1.1.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            !function (n) {
                var e = n.document,
                        t = e.documentElement,
                        i = 720, d = i / 100, o = "orientationchange"in n ? "orientationchange" : "resize",
                        a = function () {
                            var n = t.clientWidth || 320;
                            n > 720 && (n = 720),
                                    t.style.fontSize = n / d + "px";
                        };
                e.addEventListener && (n.addEventListener(o, a, !1),
                        e.addEventListener("DOMContentLoaded", a, !1));
            }(window);
        </script>
    </head>
    <body>
        <div>这是页面三</div>

        <script type="text/javascript">
            $(function () {
                pushHistory();
                window.addEventListener("popstate", function (e) {
                    alert("我监听到了浏览器的返回按钮事件啦3");//根据自己的需求实现自己的功能
                }, false);
                function pushHistory() {
                    var state = {
                        title: "监听手机返回键2",
                        url: "#"
                    };
                    window.history.pushState(state, "监听手机返回键2", "#");
                }
            });
        </script>

    </body>
</html>